<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>物业卫生保洁信息系统</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .container {
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            padding: 60px;
            text-align: center;
            max-width: 500px;
            width: 90%;
        }
        
        .logo {
            font-size: 48px;
            margin-bottom: 20px;
        }
        
        h1 {
            color: #333;
            margin-bottom: 10px;
            font-size: 28px;
        }
        
        .subtitle {
            color: #666;
            margin-bottom: 40px;
            font-size: 16px;
        }
        
        .status {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
        }
        
        .status-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
            padding: 10px;
            background: white;
            border-radius: 8px;
        }
        
        .status-label {
            color: #555;
            font-weight: 500;
        }
        
        .status-value {
            color: #28a745;
            font-weight: bold;
        }
        
        .buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 25px;
            font-size: 16px;
            cursor: pointer;
            text-decoration: none;
            transition: transform 0.2s;
        }
        
        .btn:hover {
            transform: translateY(-2px);
        }
        
        .info {
            margin-top: 30px;
            color: #888;
            font-size: 14px;
        }
        
        .api-test {
            margin-top: 20px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
            text-align: left;
        }
        
        .api-test h3 {
            margin-bottom: 10px;
            color: #333;
        }
        
        .api-test a {
            color: #667eea;
            text-decoration: none;
        }
        
        .api-test a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="logo">🏢</div>
        <h1>物业卫生保洁信息系统</h1>
        <p class="subtitle">Property Cleaning Management System</p>
        
        <div class="status">
            <div class="status-item">
                <span class="status-label">后端服务</span>
                <span class="status-value">✅ 运行中</span>
            </div>
            <div class="status-item">
                <span class="status-label">API接口</span>
                <span class="status-value">✅ 正常</span>
            </div>
            <div class="status-item">
                <span class="status-label">数据库</span>
                <span class="status-value">✅ 已连接</span>
            </div>
        </div>
        
        <div class="buttons">
            <a href="http://localhost:8080/api/swagger-ui.html" class="btn" target="_blank">API文档</a>
            <a href="http://localhost:8080/api/actuator/health" class="btn" target="_blank">健康检查</a>
            <a href="http://localhost:8080/api/users/page?page=1&size=10" class="btn" target="_blank">测试接口</a>
        </div>
        
        <div class="api-test">
            <h3>🔧 系统接口测试</h3>
            <p><strong>后端API地址:</strong> <a href="http://localhost:8080/api" target="_blank">http://localhost:8080/api</a></p>
            <p><strong>用户登录接口:</strong> POST <a href="http://localhost:8080/api/users/login" target="_blank">/api/users/login</a></p>
            <p><strong>用户注册接口:</strong> POST <a href="http://localhost:8080/api/users/register" target="_blank">/api/users/register</a></p>
            <p><strong>区域管理接口:</strong> GET <a href="http://localhost:8080/api/areas" target="_blank">/api/areas</a></p>
            <p><strong>保洁员管理接口:</strong> GET <a href="http://localhost:8080/api/cleaners" target="_blank">/api/cleaners</a></p>
            <p><strong>任务管理接口:</strong> GET <a href="http://localhost:8080/api/tasks" target="_blank">/api/tasks</a></p>
        </div>
        
        <div class="info">
            <p>💡 提示: 点击上方按钮测试系统接口，或使用Postman等工具测试API</p>
            <p>📱 前端Vue应用将在Node.js环境配置完成后启用</p>
        </div>
    </div>

    <script>
        // 简单的API测试功能
        async function testAPI() {
            try {
                const response = await fetch('http://localhost:8080/api/actuator/health');
                const data = await response.json();
                console.log('API测试成功:', data);
            } catch (error) {
                console.error('API测试失败:', error);
            }
        }

        // 页面加载完成后测试API
        window.addEventListener('load', () => {
            setTimeout(testAPI, 1000);
        });
    </script>
</body>
</html>